export function getOption1() {
  const option1 = {
    tooltip: {
      show: true,
      trigger: 'axis',
      axisPointer: {
        type: 'shadow',
        snap: true
      },
      confine: true,
      backgroundColor: '#1959a7',
      borderColor: '#4beeff',
      borderWidth: 1,
      padding: 12,
      textStyle: {
        color: '#fff',
        fontSize: 14
      },
      formatter(params: any) {
        const name = params[0].name
        let domStr1 = ''
        let domStr2 = ''
        const dom = params.reduce(
          (
            domStr: string,
            item: {
              marker: any
              seriesId: any
              seriesName: any
              data: any
              seriesType: any
            },
            index: string
          ) => {
            const { marker, seriesId, seriesName, data } = item
            const prefix =
              seriesId == '10KV' || seriesId == '110KV'
                ? '(' + seriesId + ')'
                : ''
            if (item.seriesType == 'bar') {
              domStr +=
                '<div style="display:flex"><div style="width: 180px">' +
                `${marker} ${seriesName}${prefix}</div><div style="text-align:right;width:50px;font-weight:bold">${
                  data ? data : '-'
                }</div></div>`
            }
            if (item.seriesType == 'bar') {
              domStr1 +=
                '<div style="display:flex"><div style="width: 180px">' +
                `${marker} ${seriesName}${prefix}</div><div style="text-align:right;width:80px;font-weight:bold">${
                  data ? data : '-'
                }</div></div>`
            }
            if (item.seriesType == 'line') {
              domStr2 +=
                '<div style="display:flex"><div style="width: 180px">' +
                `${marker} ${seriesName}${prefix}</div><div style="text-align:right;width:80px;font-weight:bold">${
                  data ? data : '-'
                }</div></div>`
            }
            return domStr
          },
          `${name}<br/>`
        )
        domStr1 = `<div style="display:flex;"><div style="width:60px;text-align:center">电量</div><div>${domStr1}</div></div>`
        domStr2 = `<div style="display:flex;"><div style="width:60px;text-align:center">电价</div><div>${domStr2}</div></div>`
        return (
          `<span style="margin-left: 60px">${name}</span><br/>` +
          domStr1 +
          domStr2
        )
      }
    },
    title: {
      show: true,
      text: '',
      left: '20',
      top: '10',
      right: '20',
      textStyle: {
        fontSize: 18,
        fontFamily: 'Microsoft YaHei',
        color: 'rgba(162, 199, 255,1)'
      }
    },
    legend: {
      show: true,
      selected: {
        重点企业平均: true,
        高景太阳能: false,
        时代新能源: false,
        泰丰先行: false,
        可可西里: false,
        圣源地毯: false
      },
      right: 0,
      top: 0,
      itemWidth: 15,
      width: '100%',
      data: [],
      textStyle: {
        color: '#fff',
        fontSize: 12
      }
    },
    grid: {
      containLabel: true,
      top: 40,
      right: 20,
      bottom: 60,
      left: 10
    },
    xAxis: [
      {
        type: 'category',
        data: [],
        show: true,
        axisLabel: {
          fontSize: 14,
          color: '#fff'
        },
        axisLine: {
          lineStyle: {
            color: 'rgba(126,206,244,0.3)'
          }
        },
        axisTick: {
          show: false
        }
      }
    ],
    yAxis: [
      {
        type: 'value',
        name: '量',
        position: 'right',
        nameTextStyle: {
          align: 'left',
          fontSize: 14,
          fontWeight: 'bold',
          color: 'transparent'
        },
        axisLabel: {
          fontSize: 12,
          color: '#fff'
        },
        splitLine: {
          lineStyle: {
            color: 'rgba(126,206,244,0.1)'
          }
        }
      },
      {
        type: 'value',
        name: '价格',
        show: true,
        nameTextStyle: {
          align: 'left',
          fontSize: 14,
          fontWeight: 'bold',
          color: 'transparent'
        },
        axisLabel: {
          fontSize: 12,
          color: '#fff'
        },
        splitLine: {
          lineStyle: {
            color: 'rgba(126,206,244,0.1)'
          }
        }
      }
    ],
    series: [
      {
        name: '重点企业平均',
        id: '10KV',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(243, 232, 59)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(221, 160, 28)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '重点企业平均',
        id: '110KV',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(243, 232, 59)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(221, 160, 28)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '高景太阳能',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(244, 114, 172)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(218, 43, 121)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '时代新能源',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(93, 236, 157)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(8, 139, 66)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '泰丰先行',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(244, 130, 96)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(204, 61, 17)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '可可西里',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(181, 78, 241)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(200, 124, 244)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '圣源地毯',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(78, 186, 255)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(17, 124, 192)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '重点企业平均',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(243, 232, 59)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(221, 160, 28)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '高景太阳能',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(244, 114, 172)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(218, 43, 121)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '时代新能源',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(93, 236, 157)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(8, 139, 66)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '泰丰先行',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(244, 130, 96)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(204, 61, 17)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '可可西里',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(181, 78, 241)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(200, 124, 244)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '圣源地毯',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(78, 186, 255)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(17, 124, 192)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      }
    ],
    dataZoom: [
      {
        show: true,
        type: 'slider',
        start: 50,
        end: 100,
        width: '84%',
        left: '5%',
        bottom: 38,
        height: 15,
        borderColor: '#166beb',
        handleStyle: {
          color: '#166beb',
          borderColor: '#166beb',
          borderWidth: 4
        },
        moveHandleSize: 10,
        moveHandleStyle: {
          color: '#166beb'
        },
        textStyle: {
          color: '#00c6ff'
        },
        emphasis: {
          handleStyle: {
            color: '#00c6ff',
            borderColor: '#00c6ff',
            borderWidth: 4
          },
          moveHandleStyle: {
            color: '#00c6ff'
          }
        }
      }
    ]
  }
  return option1
}
export function getOption2() {
  const option2 = {
    tooltip: {
      show: true,
      trigger: 'axis',
      axisPointer: {
        type: 'shadow',
        snap: true
      },
      confine: true,
      backgroundColor: '#1959a7',
      borderColor: '#4beeff',
      borderWidth: 1,
      padding: 12,
      textStyle: {
        color: '#fff',
        fontSize: 14
      },
      formatter(params: any) {
        const name = params[0].name
        let domStr1 = ''
        let domStr2 = ''
        const dom = params.reduce(
          (
            domStr: string,
            item: {
              marker: any
              seriesId: any
              seriesName: any
              data: any
              seriesType: any
            },
            index: string
          ) => {
            const { marker, seriesId, seriesName, data } = item
            const prefix =
              seriesId == '10KV' || seriesId == '110KV'
                ? '(' + seriesId + ')'
                : ''
            if (item.seriesType == 'bar') {
              domStr +=
                '<div style="display:flex"><div style="width: 140px">' +
                `${marker} ${seriesName}${prefix}</div><div style="text-align:right;width:80px;font-weight:bold">${
                  data ? data : '-'
                }</div></div>`
            }
            if (item.seriesType == 'bar') {
              domStr1 +=
                '<div style="display:flex"><div style="width: 140px">' +
                `${marker} ${seriesName}${prefix}</div><div style="text-align:right;width:80px;font-weight:bold">${
                  data ? data : '-'
                }</div></div>`
            }
            if (item.seriesType == 'line') {
              domStr2 +=
                '<div style="display:flex"><div style="width: 140px">' +
                `${marker} ${seriesName}${prefix}</div><div style="text-align:right;width:80px;font-weight:bold">${
                  data ? data : '-'
                }</div></div>`
            }
            return domStr
          },
          `${name}<br/>`
        )
        domStr1 = `<div style="display:flex;"><div style="width:60px;text-align:center">电量</div><div>${domStr1}</div></div>`
        domStr2 = `<div style="display:flex;"><div style="width:60px;text-align:center">电价</div><div>${domStr2}</div></div>`
        return (
          `<span style="margin-left: 60px">${name}</span><br/>` +
          domStr1 +
          domStr2
        )
      }
    },
    title: {
      show: true,
      text: '',
      left: '20',
      top: '10',
      right: '20',
      textStyle: {
        fontSize: 18,
        fontFamily: 'Microsoft YaHei',
        color: 'rgba(162, 199, 255,1)'
      }
    },
    legend: {
      show: true,
      right: 0,
      top: 0,
      itemWidth: 15,
      width: '100%',
      data: [],
      textStyle: {
        color: '#fff',
        fontSize: 12
      },
      selected: {
        风电: true,
        光伏: true,
        水电: false,
        火电: false
      }
    },
    grid: {
      containLabel: true,
      top: 50,
      right: 20,
      bottom: 38,
      left: 10
    },
    xAxis: [
      {
        type: 'category',
        data: [],
        show: true,
        axisLabel: {
          fontSize: 14,
          color: '#fff'
        },
        axisLine: {
          lineStyle: {
            color: 'rgba(126,206,244,0.3)'
          }
        },
        axisTick: {
          show: false
        }
      }
    ],
    yAxis: [
      {
        type: 'value',
        name: '量',
        position: 'right',
        nameTextStyle: {
          align: 'left',
          fontSize: 14,
          fontWeight: 'bold',
          color: 'transparent'
        },
        axisLabel: {
          fontSize: 12,
          color: '#fff'
        },
        splitLine: {
          lineStyle: {
            color: 'rgba(126,206,244,0.1)'
          }
        }
      },
      {
        type: 'value',
        name: '价格',
        show: true,
        nameTextStyle: {
          align: 'left',
          fontSize: 14,
          fontWeight: 'bold',
          color: 'transparent'
        },
        axisLabel: {
          fontSize: 12,
          color: '#fff'
        },
        splitLine: {
          lineStyle: {
            color: 'rgba(126,206,244,0.1)'
          }
        }
      }
    ],
    series: [
      {
        name: '风电',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(78, 186, 255)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(17, 124, 192)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '光伏',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        label: {
          show: false,
          textStyle: {
            //数值样式
            fontSize: 16,
            color: 'rgb(1, 251, 244)'
          },
          position: 'top'
        },
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(243, 232, 59)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(221, 160, 28)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '水电',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        label: {
          show: false,
          textStyle: {
            //数值样式
            fontSize: 16,
            color: 'rgb(1, 251, 244)'
          },
          position: 'top'
        },
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(93, 236, 157)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(8, 139, 66)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '火电',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(244, 114, 172)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(218, 43, 121)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '风电',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(78, 186, 255)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(17, 124, 192)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '光伏',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(243, 232, 59)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(221, 160, 28)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '水电',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(93, 236, 157)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(8, 139, 66)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '火电',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(244, 114, 172)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(218, 43, 121)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      }
    ],
    dataZoom: [
      {
        show: true,
        type: 'slider',
        start: 50,
        end: 100,
        width: '84%',
        left: '5%',
        bottom: 17,
        height: 15,
        borderColor: '#166beb',
        handleStyle: {
          color: '#166beb',
          borderColor: '#166beb',
          borderWidth: 4
        },
        moveHandleSize: 10,
        moveHandleStyle: {
          color: '#166beb'
        },
        textStyle: {
          color: '#00c6ff'
        },
        emphasis: {
          handleStyle: {
            color: '#00c6ff',
            borderColor: '#00c6ff',
            borderWidth: 4
          },
          moveHandleStyle: {
            color: '#00c6ff'
          }
        }
      }
    ]
  }
  return option2
}
export function getOption3() {
  const option3 = {
    tooltip: {
      show: true,
      trigger: 'axis',
      axisPointer: {
        type: 'shadow',
        snap: true
      },
      confine: true,
      backgroundColor: '#1959a7',
      borderColor: '#4beeff',
      borderWidth: 1,
      padding: 12,
      textStyle: {
        color: '#fff',
        fontSize: 14
      },
      formatter(params: any) {
        const name = params[0].name
        let domStr1 = ''
        let domStr2 = ''
        const dom = params.reduce(
          (
            domStr: string,
            item: {
              marker: any
              seriesId: any
              seriesName: any
              data: any
              seriesType: any
            },
            index: string
          ) => {
            const { marker, seriesId, seriesName, data } = item
            const prefix =
              seriesId == '10KV' || seriesId == '110KV'
                ? '(' + seriesId + ')'
                : ''
            if (item.seriesType == 'bar') {
              domStr +=
                '<div style="display:flex"><div style="width: 180px">' +
                `${marker} ${seriesName}${prefix}</div><div style="text-align:right;width:60px;font-weight:bold">${
                  data ? data : '-'
                }</div></div>`
            }
            if (item.seriesType == 'bar') {
              domStr1 +=
                '<div style="display:flex"><div style="width: 180px">' +
                `${marker} ${seriesName}${prefix}</div><div style="text-align:right;width:60px;font-weight:bold">${
                  data ? data : '-'
                }</div></div>`
            }
            if (item.seriesType == 'line') {
              domStr2 +=
                '<div style="display:flex"><div style="width: 180px">' +
                `${marker} ${seriesName}${prefix}</div><div style="text-align:right;width:60px;font-weight:bold">${
                  data ? data : '-'
                }</div></div>`
            }
            return domStr
          },
          `${name}<br/>`
        )
        domStr1 = `<div style="display:flex;"><div style="width:60px;text-align:center">电量</div><div>${domStr1}</div></div>`
        domStr2 = `<div style="display:flex;"><div style="width:60px;text-align:center">电价</div><div>${domStr2}</div></div>`
        return (
          `<span style="margin-left: 60px">${name}</span><br/>` +
          domStr1 +
          domStr2
        )
      }
    },
    title: {
      show: true,
      text: '',
      left: '20',
      top: '10',
      right: '20',
      textStyle: {
        fontSize: 18,
        fontFamily: 'Microsoft YaHei',
        color: 'rgba(162, 199, 255,1)'
      }
    },
    legend: {
      show: true,
      right: 0,
      top: 0,
      itemWidth: 15,
      width: '100%',
      data: [],
      textStyle: {
        color: '#fff',
        fontSize: 12
      }
    },
    grid: {
      containLabel: true,
      top: 50,
      right: 20,
      bottom: 38,
      left: 10
    },
    xAxis: [
      {
        type: 'category',
        data: [],
        show: true,
        axisLabel: {
          fontSize: 14,
          color: '#fff'
        },
        axisLine: {
          lineStyle: {
            color: 'rgba(126,206,244,0.3)'
          }
        },
        axisTick: {
          show: false
        }
      }
    ],
    yAxis: [
      {
        type: 'value',
        name: '量',
        position: 'right',
        nameTextStyle: {
          align: 'left',
          fontSize: 14,
          fontWeight: 'bold',
          color: 'transparent'
        },
        axisLabel: {
          fontSize: 12,
          color: '#fff'
        },
        splitLine: {
          lineStyle: {
            color: 'rgba(126,206,244,0.1)'
          }
        }
      },
      {
        type: 'value',
        name: '价格',
        show: true,
        nameTextStyle: {
          align: 'left',
          fontSize: 14,
          fontWeight: 'bold',
          color: 'transparent'
        },
        axisLabel: {
          fontSize: 12,
          color: '#fff'
        },
        splitLine: {
          lineStyle: {
            color: 'rgba(126,206,244,0.1)'
          }
        }
      }
    ],
    series: [
      {
        name: '售电企业省外购入',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(78, 186, 255)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(17, 124, 192)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '售电企业省内市场交易',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        label: {
          show: false,
          textStyle: {
            //数值样式
            fontSize: 16,
            color: 'rgb(1, 251, 244)'
          },
          position: 'top'
        },
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(243, 232, 59)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(221, 160, 28)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '售电企业省外购入',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(78, 186, 255)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(17, 124, 192)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '售电企业省内市场交易',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(243, 232, 59)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(221, 160, 28)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      }
    ],
    dataZoom: [
      {
        show: true,
        type: 'slider',
        start: 50,
        end: 100,
        width: '84%',
        left: '5%',
        bottom: 17,
        height: 15,
        borderColor: '#166beb',
        handleStyle: {
          color: '#166beb',
          borderColor: '#166beb',
          borderWidth: 4
        },
        moveHandleSize: 10,
        moveHandleStyle: {
          color: '#166beb'
        },
        textStyle: {
          color: '#00c6ff'
        },
        emphasis: {
          handleStyle: {
            color: '#00c6ff',
            borderColor: '#00c6ff',
            borderWidth: 4
          },
          moveHandleStyle: {
            color: '#00c6ff'
          }
        }
      }
    ]
  }
  return option3
}
export function getOption4() {
  const option4 = {
    tooltip: {
      show: true,
      trigger: 'axis',
      axisPointer: {
        type: 'shadow',
        snap: true
      },
      confine: true,
      backgroundColor: '#1959a7',
      borderColor: '#4beeff',
      borderWidth: 1,
      padding: 12,
      textStyle: {
        color: '#fff',
        fontSize: 14
      },
      formatter(params: any) {
        const name = params[0].name
        let domStr1 = ''
        let domStr2 = ''
        const dom = params.reduce(
          (
            domStr: string,
            item: {
              marker: any
              seriesId: any
              seriesName: any
              data: any
              seriesType: any
            },
            index: string
          ) => {
            const { marker, seriesId, seriesName, data } = item
            const prefix =
              seriesId == '10KV' || seriesId == '110KV'
                ? '(' + seriesId + ')'
                : ''
            if (item.seriesType == 'bar') {
              domStr +=
                '<div style="display:flex"><div style="width: 140px">' +
                `${marker} ${seriesName}${prefix}</div><div style="text-align:right;width:60px;font-weight:bold">${
                  data ? data : '-'
                }</div></div>`
            }
            if (item.seriesType == 'bar') {
              domStr1 +=
                '<div style="display:flex"><div style="width: 140px">' +
                `${marker} ${seriesName}${prefix}</div><div style="text-align:right;width:60px;font-weight:bold">${
                  data ? data : '-'
                }</div></div>`
            }
            if (item.seriesType == 'line') {
              domStr2 +=
                '<div style="display:flex"><div style="width: 140px">' +
                `${marker} ${seriesName}${prefix}</div><div style="text-align:right;width:60px;font-weight:bold">${
                  data ? data : '-'
                }</div></div>`
            }
            return domStr
          },
          `${name}<br/>`
        )
        domStr1 = `<div style="display:flex;"><div style="width:60px;text-align:center">电量</div><div>${domStr1}</div></div>`
        domStr2 = `<div style="display:flex;"><div style="width:60px;text-align:center">电价</div><div>${domStr2}</div></div>`
        return (
          `<span style="margin-left: 60px">${name}</span><br/>` +
          domStr1 +
          domStr2
        )
      }
    },
    title: {
      show: true,
      text: '',
      left: '20',
      top: '10',
      right: '20',
      textStyle: {
        fontSize: 18,
        fontFamily: 'Microsoft YaHei',
        color: 'rgba(162, 199, 255,1)'
      }
    },
    legend: {
      show: true,
      right: 0,
      top: 0,
      itemWidth: 15,
      width: '100%',
      data: [],
      textStyle: {
        color: '#fff',
        fontSize: 12
      }
    },
    grid: {
      containLabel: true,
      top: 50,
      right: 20,
      bottom: 38,
      left: 10
    },
    xAxis: [
      {
        type: 'category',
        data: [],
        show: true,
        axisLabel: {
          fontSize: 14,
          color: '#fff'
        },
        axisLine: {
          lineStyle: {
            color: 'rgba(126,206,244,0.3)'
          }
        },
        axisTick: {
          show: false
        }
      }
    ],
    yAxis: [
      {
        type: 'value',
        name: '量',
        position: 'right',
        nameTextStyle: {
          align: 'left',
          fontSize: 14,
          fontWeight: 'bold',
          color: 'transparent'
        },
        axisLabel: {
          fontSize: 12,
          color: '#fff'
        },
        splitLine: {
          lineStyle: {
            color: 'rgba(126,206,244,0.1)'
          }
        }
      },
      {
        type: 'value',
        name: '价格',
        show: true,
        nameTextStyle: {
          align: 'left',
          fontSize: 14,
          fontWeight: 'bold',
          color: 'transparent'
        },
        axisLabel: {
          fontSize: 12,
          color: '#fff'
        },
        splitLine: {
          lineStyle: {
            color: 'rgba(126,206,244,0.1)'
          }
        }
      }
    ],
    series: [
      {
        name: '一般工商业',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(78, 186, 255)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(17, 124, 192)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '居民',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        label: {
          show: false,
          textStyle: {
            //数值样式
            fontSize: 16,
            color: 'rgb(1, 251, 244)'
          },
          position: 'top'
        },
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(243, 232, 59)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(221, 160, 28)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '农业',
        type: 'bar',
        yAxisIndex: 0,
        data: [],
        label: {
          show: false,
          textStyle: {
            //数值样式
            fontSize: 16,
            color: 'rgb(1, 251, 244)'
          },
          position: 'top'
        },
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(93, 236, 157)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(8, 139, 66)' // 100% 处的颜色
              }
            ]
          }
        },
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '一般工商业',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(78, 186, 255)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(17, 124, 192)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '居民',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(243, 232, 59)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(221, 160, 28)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      },
      {
        name: '农业',
        type: 'line',
        yAxisIndex: 1,
        data: [],
        datasetIndex: 0,
        itemStyle: {
          color: {
            type: 'linear',
            x: 0, //右
            y: 0, //下
            x2: 0, //左
            y2: 1, //上
            colorStops: [
              {
                offset: 0,
                color: 'rgb(93, 236, 157)' // 0% 处的颜色
              },
              {
                offset: 1,
                color: 'rgb(8, 139, 66)' // 100% 处的颜色
              }
            ]
          }
        },
        symbolSize: 10,
        areaStyle: {
          opacity: 0
        }
      }
    ],
    dataZoom: [
      {
        show: true,
        type: 'slider',
        start: 50,
        end: 100,
        width: '84%',
        left: '4.3%',
        bottom: 15,
        height: 15,
        borderColor: '#166beb',
        handleStyle: {
          color: '#166beb',
          borderColor: '#166beb',
          borderWidth: 4
        },
        moveHandleSize: 10,
        moveHandleStyle: {
          color: '#166beb'
        },
        textStyle: {
          color: '#00c6ff'
        },
        emphasis: {
          handleStyle: {
            color: '#00c6ff',
            borderColor: '#00c6ff',
            borderWidth: 4
          },
          moveHandleStyle: {
            color: '#00c6ff'
          }
        }
      }
    ]
  }
  return option4
}
